﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.XPath;

namespace DIfmClient
{
    public class Playlist
    {
        private static XmlNodeList allPlayListNodes { get; set; }

        public static List<Track> GetTracklistByChannel(ref Channel c)
        {
            List<Track> tl = new List<Track>();

            try
            {
                //XPathNavigator nav;
                //XPathDocument docNav;
                //XPathNodeIterator nodeIter;
                //string strExpr;

                

                //docNav = new XPathDocument(ConfigurationManager.AppSettings.Get("oldXML"));
                //nav = docNav.CreateNavigator();
                //strExpr = String.Format("CHANNELS/CHANNEL/CHANNELTITLE[{0}]/TRACKS/TRACK", c.ChannelTitle);

                //nodeIter = nav.Select(strExpr);
                //while (nodeIter.MoveNext())
                //{
                //    Track t = new Track();
                //    //t.TrackTitle = nodeIter.Current
                //    //c.TrackList.Add(
                //}
            }
            catch (Exception)
            {
                
                throw;
            }

            return tl;
        }
    }
}
